package com.zhonghui.mapper;

import com.zhonghui.annotation.AutoFill;
import com.zhonghui.dto.PageDto;
import com.zhonghui.enumeration.OperationType;
import com.zhonghui.model.OrderDetail;
import com.zhonghui.model.OrderInfo;
import com.zhonghui.vo.OrderRecordVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author: FL
 * @create: 2024 2024/5/5 13:27
 */
@Mapper
public interface OrderMapper {
    List<OrderDetail> getOrderPage(Long userId);

    List<OrderInfo> getOrderInfoByOrderNo(Long userId,String orderNo);

    List<OrderDetail> getOrderByOrderNo(Long userId,String orderNo);

    @AutoFill(value = OperationType.INSERT)
    void createOrderInfo(OrderInfo orderInfo);

    @AutoFill(value = OperationType.INSERT)
    void createOrderDetail(OrderDetail orderDetail);

    @AutoFill(value = OperationType.UPDATE)
    Integer updateOrderInfo(OrderInfo orderInfo);

    @AutoFill(value = OperationType.UPDATE)
    Integer updateOrderDetail(OrderDetail orderDetail);
}
